package com.data.center.controller.neo4j;
import com.data.center.entity.neo4j.neoOrganization;
import com.data.center.service.neo4j.neoOrganizationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/neo/organizations")
public class neoOrganizationController {
    @Autowired
    private neoOrganizationService neoOrganizationService;

    @PostMapping
    public neoOrganization createOrganization(@RequestBody neoOrganization neoOrganization) {
        return neoOrganizationService.saveOrganization(neoOrganization);
    }

    @GetMapping("/{id}")
    public neoOrganization getOrganizationById(@PathVariable String id) {
        return neoOrganizationService.getOrganizationById(id);
    }
}
